<!DOCTYPE html>
<html>
<head>
    <title>欢迎</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">


    {include file="common/header" /}
    {include file="common/script" /}

</head>

<body ontouchstart style="background: url(__CDN__/assets/weiui/images/bg2.jpg) repeat fixed top">


<div class="weui-msg">
    <div class="weui-msg__icon-area">
        <i class="wx wx-haixian" style="color: #fff;font-size: 60px"></i>
        <p class="weui-btn-area" style="margin-top: 0px;color: #fff;font-weight: 300">
          鲜人掌 好食材鲜人一步
        </p>

    </div>

    <div class="weui-msg__opr-area">
        <p class="weui-btn-area">
            <a href="javascript:bind();"
               style="width: 50%;margin-top: 5px;margin-bottom: 10px;border-radius:20px;"
               class="new_order weui-btn-small weui-btn weui-btn_plain-primary">新用户绑定</a>
        </p>
    </div>
    <div class="weui-msg__extra-area">

        {include file="common/link" /}
        <p class="demos-sub-title" style="color: #CDCDCD;font-size: 12px">精于心 鲜人掌v0.1</p>
    </div>
</div>

<script>
    function bind() {
        //   是否绑定
        $.activelogin({
            title: '登 录',
            text: '使用手机号绑定',
            onOK: function (tel, ack) {
                console.log(tel, ack);
                $.showLoading();
                $.post("{:url('index/auth/bind')}", {tel: tel, ack: ack}, function (res) {
                    $.hideLoading();
                    if (res.code == 0) {
                        $.toast(res.msg, 'cancel');
                    } else {
                        $.toast(res.msg);
                        location.href=res.url;
                    }

                });


            },
            onCancel: function () {
//                $.toast('取 消!', 'cancel');
            }
        });
    }
</script>

</body>
</html>
